import myaxios from '../utils/myaxios.js'
// 登录
export const login = (data)=>{
    return myaxios({
        method: 'post',
        url:'/login',
        data
    })
}
// 用户详情
export const personData = (id) => {
    return myaxios({
        method: 'get',
        url:`/user/${id}`
    })
}
// 编辑用户信息
export const updatePerson = (id,data) => {
    return myaxios({
        method: 'post',
        url:`/user_update/${id}`,
        data
    })
}
//注册
export const register = (data) => {
    return myaxios({
        method: 'post',
        url: '/register',
        data
    })
}
// 关注
export const follow = (id) => {
    return myaxios({
        url: `/user_follows/${id}`
    })
}
// 取消关注
export const unfollow = (id) => {
    return myaxios({
        url: `user_unfollow/${id}`
    })
}
// 关注列表
export const myfollows = () => {
    return myaxios({
        url: '/user_follows'
    })
}
